package com.wtgroup.demo.mianshi.容器.map;

import java.util.WeakHashMap;

/**
 * @author dafei
 * @version 0.1
 * @date 2021/3/8 23:13
 */
public class D002_WeakHashMap {

    /*
    ? 怎么看到效果 ?
    */
    public static void main(String[] args) {
        WeakHashMap<String, Object> whm = new WeakHashMap<>();
        byte[] a = new byte[10 * 1024 * 1024];
        whm.put("a", a);
        System.out.println(whm.get("a"));
        byte[] b = new byte[15 * 1024 * 1024];
        whm.put("b", b);
        System.out.println(whm.get("a"));

    }
}
